1. Field of the Invention
The invention relates generally to Serial Attached SCSI (SAS) expanders and more specifically relates to methods and structures for enabling Fast Context Switching (FCS) between a SAS initiator device and a plurality of SAS target devices coupled with multiple SAS expanders in a SAS domain.
2. Discussion of Related Art
In a SAS environment, SAS initiators are coupled with one or more target devices through intermediate SAS expanders. The target devices may be SAS targets or Serial Advanced Technology Attachment (SATA) targets. In general, the collection of SAS expanders between the initiators and targets is referred to as a SAS Service Delivery Subsystem (SDS).
When a SAS initiator contacts a SAS target device, an open connection is initially established by a SAS initiator transmitting an Open Address Frame (OAF) through the SDS and receiving an acceptance (OPEN_ACCEPT primitive) from the identified SAS target device. The open request and acceptance are routed and passed through each SAS expander between the initiator and target. Once a connection is established, physical links (PHYs) used for the connection by SAS expanders between the initiator and target devices act in a “pass-through” mode until the connection is closed by the initiator. Once an expander senses that a previously established connection has been closed, it awaits receipt of a next OAF to establish another connection.
Similarly, when an STP initiator establishes a connection with a SATA target, the STP initiator transmits an OAF to the SATA target. The SAS expander that is directly coupled with the identified SATA target device (e.g., the “end expander”) responds with an OPEN_ACCEPT on behalf of the identified SATA target device to thus establish the desired connection through the SDS.
When establishing a connection, SAS expanders which PHYs of the expander will be used. The PHYs are then coupled with one another by a switching circuit. When the SAS expander detects closure of a previously established connection, the coupled PHYs used for that connection are released to allow them to service other connections.
Existing enhancements to the SAS protocols to allow connections between a single initiator and multiple SAS target devices to remain open or established so that switching between connections may be performed without “tearing down” all resources used in an established connection. LSI Corporation refers to such systems as Fast Context Switching (FCS) systems. An FCS capable SAS expander that is directly coupled to multiple SAS target devices can detect receipt of a new form of SAS frame that requests a Fast Context Switch from the currently utilized connection to another previously established connection that has not been completely closed. Thus, multiple established connections may remain open between a single SAS initiator and multiple SAS target devices. A new SAS frame (e.g., a SWITCH Address Frame—“SAF”) may be used to switch between previously established connections without incurring the overhead of “tearing down” and “setting up” each connection sequentially.